home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / inverse.dxr / 00006.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  1.1 KB  |  37 lines

  1. on exitFrame
  2.   set the trails of sprite 3 to 1
  3.   set the trails of sprite 4 to 1
  4.   set the trails of sprite 5 to 1
  5.   set y3 to the locH of sprite 3
  6.   set y4 to the locH of sprite 4
  7.   set y5 to the locH of sprite 5
  8.   set x to 0
  9.   repeat with n = 0 to 140
  10.     if the mouseDown then
  11.       set the loc of sprite 3 to point(900, 900)
  12.       set the loc of sprite 4 to point(900, 900)
  13.       set the loc of sprite 5 to point(900, 900)
  14.       updateStage()
  15.       set the stageColor to the stageColor
  16.       exit repeat
  17.     end if
  18.     set x to x + 4
  19.     set the locV of sprite 3 to x
  20.     set the locV of sprite 4 to x
  21.     set the locV of sprite 5 to x
  22.     set the locH of sprite 3 to (-30 * float(float(sin(x * 0.0213)))) + y3
  23.     set the locH of sprite 4 to (-25 * float(float(tan(x * 0.0213)))) + y4
  24.     set the locH of sprite 5 to (-30 * float(float(cos(x * 0.0213)))) + y5
  25.     updateStage()
  26.     startTimer()
  27.     repeat while the timer < 1
  28.       if the mouseDown then
  29.         exit repeat
  30.       end if
  31.     end repeat
  32.   end repeat
  33.   set the trails of sprite 3 to 0
  34.   set the trails of sprite 4 to 0
  35.   set the trails of sprite 5 to 0
  36. end
  37.